<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数</title>
    <script type="text/javascript">
        function hi(){
            alert("你好")
        }
    </script>
</head>
<body>
<button onclick="hi()">点击这里</button>
</body>
</html>